﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Code.DAL;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void btnOk_Click(object sender, EventArgs e)
    {
        string db = txtDataBase.Text;
        DBCon con = new DBCon();
        con.CreateTable(txtIp.Text, txtUserName.Text, txtPwd.Text, txtDataBase.Text);
        Session["Tables"] = con.DB.Tbs;
        GridView1.DataSource = con.DB.Tbs.OrderBy(x => x.Name).ToList();
        GridView1.DataBind();
        tb.Visible = false;
        Session["NameSpace"] = txtNameSpace.Text;
        Session["Assembly"]= txtAssembly.Text;
    }
}